package com.ssm.subject.domain.convert;

import com.ssm.subject.domain.bo.SubjectCategoryBO;
import com.ssm.subject.infra.basic.entity.SubjectCategory;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper //mapstruct包下的mapper注解
public interface SubjectCategoryBOConverter {

    SubjectCategoryBOConverter INSTANCE = Mappers.getMapper(SubjectCategoryBOConverter.class);

    //CategoryBo转为Category
    SubjectCategory convertBoToCatrgory(SubjectCategoryBO subjectCategoryBO);

    //List<Category> 转为 List<CategoryBO>
    List<SubjectCategoryBO> categoryListToBOList(List<SubjectCategory> subjectCategoryList);

}

